home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 40
/
Aminet 40 (2000)(Schatztruhe)[!][Dec 2000].iso
/
Aminet
/
util
/
cdity
/
ModeProSrc.lha
/
Daemon
/
MPCloneWB.c
< prev
next >
Wrap
C/C++ Source or Header
|
1997-06-14
|
1KB
|
43 lines
#include "MP.h"
extern struct Screen * __asm (*OldLockPubScreen)(register __a0 UBYTE *Name,
register __a6 struct Library *);
BOOL CloneWB(struct DefaultNode *DNode)
{
struct Screen *wscr;
struct DrawInfo *dri;
ULONG misc;
BOOL rv;
rv=0;
if(wscr=OldLockPubScreen("Workbench",(struct Library *)IntuitionBase))
{
if(dri=GetScreenDrawInfo(wscr))
{
misc=GetVPModeID(&wscr->ViewPort);
switch(DNode->ModeSelect)
{
case MS_PROMOTE_MONITOR:
DNode->ModeID=(MONITOR_ID_MASK & misc);
break;
case MS_PROMOTE_SCREENMODE:
case MS_PROMOTE_REQUESTER:
DNode->ModeID=misc;
DNode->Width=wscr->Width;
DNode->Height=wscr->Height;
DNode->Depth=dri->dri_Depth;
DNode->Flags|=DEPTH;
break;
}
DNode->FontType =SFONT_SYS;
DNode->Look3D =1;
DNode->Flags |=(DNF_3D_DEFAULT|SHAREPENS);
DNode->AutoScroll =1;
rv=1;
FreeScreenDrawInfo(wscr,dri);
}
UnlockPubScreen(0,wscr);
}
return(rv);
}